home *** CD-ROM | disk | FTP | other *** search
- on playPath path, channelrange, cycletime, cycles, rateflag, relativeflag, polyflag, reverseflag
- global userobject
- set path to callAncestor(#preparePath, userobject, path)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- set cycletime to callAncestor(#prepareCycletime, userobject, cycletime)
- set cycles to callAncestor(#prepareCycles, userobject, cycles)
- case 1 of
- (path < 0):
- return path
- (channelrange < 0):
- return channelrange
- (cycletime < 0):
- return cycletime
- (cycles < 0):
- return cycles
- end case
- set instance to new(script "Path Object", channelrange)
- call(#setUp, instance, path, cycletime, cycles, rateflag, relativeflag, polyflag, reverseflag, the timer)
- return instance
- end
-
- on playCels framerange, channelrange, cycletime, cycles, rateflag, relativeflag, smoothflag, reverseflag
- global userobject
- set framerange to callAncestor(#prepareFrameRange, userobject, framerange)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- set cycletime to callAncestor(#prepareCycletime, userobject, cycletime)
- set cycles to callAncestor(#prepareCycles, userobject, cycles)
- case 1 of
- (framerange < 0):
- return framerange
- (channelrange < 0):
- return channelrange
- (cycletime < 0):
- return cycletime
- (cycles < 0):
- return cycles
- end case
- set instance to new(script "Cels Object", channelrange)
- call(#setUp, instance, framerange, cycletime, cycles, rateflag, relativeflag, smoothflag, reverseflag, the timer)
- return instance
- end
-
- on playSequence sequence, channelrange, cycletime, cycles, rateflag, reverseflag
- global userobject
- set sequence to callAncestor(#prepareSequence, userobject, sequence)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- set cycletime to callAncestor(#prepareCycletime, userobject, cycletime)
- set cycles to callAncestor(#prepareCycles, userobject, cycles)
- case 1 of
- (sequence < 0):
- return sequence
- (channelrange < 0):
- return channelrange
- (cycletime < 0):
- return cycletime
- (cycles < 0):
- return cycles
- end case
- set instance to new(script "Sequence Object", channelrange)
- call(#setUp, instance, sequence, cycletime, cycles, rateflag, reverseflag, the timer)
- return instance
- end
-
- on setStage framenumber, channelrange
- global userobject
- if voidp(channelrange) then
- set channelrange to [1, the maxchannel of userobject]
- end if
- set framenumber to callAncestor(#prepareFrameRange, userobject, framenumber)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- case 1 of
- (framenumber < 0):
- return framenumber
- (channelrange < 0):
- return channelrange
- end case
- return setStage(userobject, getAt(framenumber, 1), channelrange)
- end
-
- on pauseAnimation instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- callAncestor(#pause, instance)
- return 1
- end
-
- on resumeAnimation instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- callAncestor(#resume, instance)
- end
-
- on reverseAnimation instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- call(#reverse, instance)
- return 1
- end
-
- on stopAnimation instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- callAncestor(#stop, instance)
- return 1
- end
-
- on finishAnimation instance, interuptflag, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- return call(#finish, userobject, instance, interuptflag)
- end
-
- on delayAnimation delay, instance, notflag
- global userobject
- set delay to callAncestor(#prepareDelay, userobject, delay)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (delay < 0):
- return delay
- (instance < 0):
- return instance
- end case
- callAncestor(#delay, instance, delay)
- return 1
- end
-
- on paceAnimation playrate, instance, notflag
- global userobject
- set playrate to callAncestor(#preparePercent, userobject, playrate)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (playrate < 0):
- return playrate
- (instance < 0):
- return instance
- end case
- callAncestor(#pace, instance, playrate)
- end
-
- on offsetAnimation horzoffset, vertoffset, instance, notflag
- global userobject
- set horzoffset to callAncestor(#prepareLocValue, userobject, horzoffset)
- set vertoffset to callAncestor(#prepareLocValue, userobject, vertoffset)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- stringp(horzoffset):
- return value(horzoffset)
- stringp(vertoffset):
- return value(vertoffset)
- (instance < 0):
- return instance
- end case
- call(#offset, instance, horzoffset, vertoffset)
- end
-
- on scaleAnimation horzpercent, vertpercent, instance, relativeflag, notflag
- global userobject
- set horzpercent to callAncestor(#preparePercent, userobject, horzpercent)
- set vertpercent to callAncestor(#preparePercent, userobject, vertpercent)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (horzpercent < 0):
- returnhorzpercent()
- (vertpercent < 0):
- return vertpercent
- (instance < 0):
- return instance
- end case
- call(#scale, instance, horzpercent, vertpercent, relativeflag)
- end
-
- on rotateAnimation rotation, instance, relativeflag, notflag
- global userobject
- set rotation to callAncestor(#prepareRotation, userobject, rotation)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (rotation < 0):
- return rotation
- (instance < 0):
- return instance
- end case
- call(#rotate, instance, rotation, relativeflag)
- end
-
- on retargetAnimation horz, vert, instance, relativeflag, notflag
- global userobject
- set horz to callAncestor(#prepareLocValue, userobject, horz)
- set vert to callAncestor(#prepareLocValue, userobject, vert)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- stringp(horz):
- return value(horz)
- stringp(vert):
- return value(vert)
- (instance < 0):
- return instance
- end case
- call(#retarget, instance, horz, vert, relativeflag)
- end
-
- on snapAnimation snaphorz, snapvert, instance, notflag
- global userobject
- set snaphorz to callAncestor(#prepareSnap, userobject, snaphorz)
- set snapvert to callAncestor(#prepareSnap, userobject, snapvert)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (snaphorz < 0):
- return snaphorz
- (snapvert < 0):
- return snapvert
- (instance < 0):
- return instance
- end case
- call(#snap, instance, snaphorz, snapvert)
- end
-
- on setCycle cycles, instance, notflag
- global userobject
- set cycles to callAncestor(#prepareCycles, userobject, cycles)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (cycles < 0):
- return cycles
- (instance < 0):
- return instance
- end case
- callAncestor(#setCycle, instance, cycles)
- end
-
- on setCycletime newcycletime, instance, notflag
- global userobject
- set newcycletime to callAncestor(#prepareCycletime, userobject, newcycletime)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (newcycletime < 0):
- return newcycletime
- (instance < 0):
- return instance
- end case
- callAncestor(#setCycletime, instance, newcycletime)
- end
-
- on setCyclePercent newcyclepercent, instance, notflag
- global userobject
- set newcyclepercent to callAncestor(#preparePercent, userobject, newcyclepercent)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (newcyclepercent < 0):
- return newcyclepercent
- (instance < 0):
- return instance
- end case
- callAncestor(#setCyclePercent, instance, newcyclepercent)
- end
-
- on setPath newpath, instance, notflag
- global userobject
- set newpath to callAncestor(#preparePath, userobject, newpath)
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- case 1 of
- (newpath < 0):
- return newpath
- (instance < 0):
- return instance
- end case
- call(#setPath, instance, newpath)
- end
-
- on getMouseDirection
- global trackobject
- return call(#getMouseDirection, trackobject)
- end
-
- on getMouseSpeed
- global trackobject
- return call(#getMouseSpeed, trackobject)
- end
-
- on getMouseVector channel
- global userobject, trackobject
- set channel to callAncestor(#prepareChannelrange, userobject, channel)
- if channel < 0 then
- set channel to 0
- else
- set channel to getAt(channel, 1)
- end if
- return call(#getMouseVector, trackobject, channel)
- end
-
- on getSpriteDirection channelrange
- global userobject, trackobject
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- if channelrange < 0 then
- return channelrange
- end if
- return call(#getSpriteDirection, trackobject, channelrange)
- end
-
- on getSpriteSpeed channelrange
- global userobject, trackobject
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- if channelrange < 0 then
- return channelrange
- end if
- return call(#getSpriteSpeed, trackobject, channelrange)
- end
-
- on getSpriteVector channelrange
- global userobject, trackobject
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- if channelrange < 0 then
- return channelrange
- end if
- return call(#getSpriteVector, trackobject, channelrange)
- end
-
- on getCycleTime instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, the cycletime of me)
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on getCycle instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, the currentcycle of me)
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on getCyclePercent instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, callAncestor(#getCyclePercent, me))
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on getFinishedPercent instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, callAncestor(#getFinishedPercent, me))
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on getChannelList instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, the channel of me)
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on animationP instance
- global userobject, childlist
- if not objectp(instance) and not listp(instance) then
- return 0
- end if
- set instance to callAncestor(#prepareInstance, userobject, instance, 0)
- if instance < 0 then
- return 0
- end if
- repeat with n = 1 to count(instance)
- if getOne(childlist, getAt(instance, n)) > 0 then
- return 1
- end if
- end repeat
- return 0
- end
-
- on getAnimationError error
- global userobject
- return call(#getAnimationError, userobject, error)
- end
-
- on getPath instance, notflag
- global userobject
- set instance to callAncestor(#prepareInstance, userobject, instance, notflag)
- if instance < 0 then
- return instance
- end if
- set returnlist to [:]
- repeat with n = 1 to count(instance)
- set me to getAt(instance, n)
- addProp(returnlist, me, call(#getPath, me))
- end repeat
- if count(returnlist) = 1 then
- return getAt(returnlist, 1)
- else
- return returnlist
- end if
- end
-
- on importPath filepathname
- global userobject
- return call(#import, userobject, filepathname)
- end
-
- on pathToScore path, framerange, channelrange, polyflag, overwriteflag, reverseflag
- global userobject
- set path to callAncestor(#preparePath, userobject, path)
- set framerange to callAncestor(#prepareFrameRange, userobject, framerange)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- case 1 of
- (path < 0):
- return path
- (framerange < 0):
- return framerange
- (channelrange < 0):
- return channelrange
- end case
- call(#pathToScore, userobject, path, framerange, channelrange, polyflag, overwriteflag, reverseflag)
- end
-
- on sequenceToScore sequence, framerange, channelrange, overwriteflag, reverseflag
- global userobject
- set sequence to callAncestor(#prepareSequence, userobject, sequence)
- set framerange to callAncestor(#prepareFrameRange, userobject, framerange)
- set channelrange to callAncestor(#prepareChannelrange, userobject, channelrange)
- case 1 of
- (sequence < 0):
- return sequence
- (framerange < 0):
- return framerange
- (channelrange < 0):
- return channelrange
- end case
- call(#sequenceToScore, userobject, sequence, framerange, channelrange, overwriteflag, reverseflag)
- end
-